#ifndef M0WIG_H
#define M0WIG_H

//设置stm32各个数值
#include <QWidget>
#include <QtWidgets>
#include "mqtthandler.h"
#include <stdio.h>
namespace Ui {
class M0Wig;
}

class M0Wig : public QWidget
{
    Q_OBJECT

public:
    explicit M0Wig(QWidget *parent = 0);
    ~M0Wig();
    void publish(QByteArray text);
    QString pathlightopen;
    QString pathlightclose;
    QPixmap lightopen;
    QPixmap lightclose;
protected:
    void paintEvent(QPaintEvent*);
signals:
    void dataDownSignal(QMQTT::Message);//数据下发信号

private:
    Ui::M0Wig *ui;
    QButtonGroup* groupopen;
    QButtonGroup* groupclose;
    QButtonGroup* groupshangbao;
private slots:
    void dataUpSlot(const QByteArray&);//数据接收槽函数
    // 与开按钮组信号连接
    void btnclicklightSlot(int);
    void radioButtonSlot(int);
    void btnshuaxinSlot();
};

#endif // M0WIG_H
